<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/base/jsp/include.jsp"%>
<style>

</style>
<script type="text/javascript">
    var id = "${id}";
    var submitForm = function($dialog, $grid, $pjq) {
        if ($('form').form('validate')) {
            var obj=sy.serializeObject($('form'));
            obj.beginTime+=" 00:00:00";
            obj.endTime+=" 00:00:00";
            var url=sy.contextPath + '/companyRegisterNew/save.do';
            $.post(url, obj, function(result) {
                if (result.code == 0) {
                    $grid.datagrid('reload');
                    $dialog.dialog('destroy');
                } else {
                    $pjq.messager.e('添加失败,'+result.msg);
                }
            }, 'json');
        }
    };
    
   $(function() {
            $('#zaiti').combobox({
                url:sy.contextPath + '/zaiti/myZaitilist.do',
                valueField:'id',
                textField:'zaitiName',
            });
    });
   
   $(function() {
        $('#type').combobox({
            url:sy.contextPath + '/cyType/myCylist.do',
            valueField:'id',
            textField:'cyTypeName',
        });
    });
   
   $(function() {
       if (id != '') {
           parent.$.messager.progress({
               text : '数据加载中....'
           });
           $.post(sy.contextPath + '/companyRegisterNew/findById.do', {
               id : id
           }, function(result) {
               if (result) {
                   $('form').form('load', result);
                   $('#file_upload').setFileId(result.image,true,true);
               }
               parent.$.messager.progress('close');
           }, 'json');
       }
       
       
   });
</script>
</head>
<body>
    <form id="form" method="post">
        <input name="id" type="hidden" />
        <input name="fid" type="hidden" />
        <div style="padding:15px;font-size: 12px">
            <table style="table-layout:fixed;" border="0" cellspacing="0" class="formtable">
                <tr>
                    <th style="width:100px;">企业名称：</th>
                    <td>
                        <input class="easyui-textbox" id = "companyName" name = "companyName"  data-options="required:true,validType:'length[1,50]'" style="width:100%"/>
                    </td>
                    <th style="width:100px;">行业类别：</th>
                    <td>
                        <input class="easyui-combobox" id = "type" name = "type"  data-options="required:true,editable:false" style="width:100%"/>
                    </td>
                                
                </tr>   
                <tr> 
                    <th style="width:100px;">使用面积(平方米)：</th>
                    <td>
                        <input class="easyui-numberbox" id = "area" name = "area"  data-options="required:true,validType:'length[1,50]',prompt:'请输入'" style="width:100%"/>
                    </td>   
                    <th style="width:100px;">选择载体：</th>
                    <td>
                        <input class="easyui-combobox" id = "zaiti" name = "zaiti"  data-options="required:true,editable:false" style="width:100%"/>
                    </td>
                    
                </tr>
                <tr>
                	<th style="width:100px;">从业人员(人)：</th>
                    <td>
                        <input class="easyui-numberbox" id = "pepole" name = "pepole"  data-options="required:true,validType:'length[1,50]'" style="width:100%"/>
                    </td>  
                    <th style="width:100px;">属地：</th>
                    <td>
                        <select class="easyui-combobox" id="shudi"  name="shudi" data-options="required:true,editable:false" style="width:100%">
										<option value='属地注册企业'>属地注册企业</option>
										<option value='非属地企业'>非属地企业</option>
										<option value='创业团队'>创业团队</option>
						</select>
                    </td>                                                      
                 </tr>
                 <tr>
                 	<th style="width:100px;">开始日期：</th>
                    <td>
                    	<input class="easyui-datebox" id="beginTime" name="beginTime" data-options="required:true,editable:false" style="width:100%"/>
                    </td>
                    <th style="width:100px;">结束日期：</th>
                    <td>
                    	<input class="easyui-datebox" id="endTime" name="endTime" data-options="required:true,editable:false" style="width:100%"/>
                    </td>                	
                 </tr>
                 <!--<tr>
                 	<th style="width:100px;">营业收入(万元)：</th>
                    <td>
                        <input class="easyui-numberbox" id = "income" name = "income" min = "1" precision = "2"  data-options="required:true,validType:'length[1,10]',prompt:'请输入'" style="width:100%"/>
                    </td>
                 	<th style="width:100px;">去年同期营业收入(万元)：</th> 
                 	<td>
                        <input class="easyui-numberbox" id = "incomeLastYear" name = "incomeLastYear" min = "1" precision = "2"  data-options="required:true,validType:'length[1,10]',prompt:'请输入'" style="width:100%"/>
                    </td> 
                 </tr> -->                                   
            </table>
        </div>
    </form>
</body>
</html>